home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Art / Md-Mz / MediaKeeper 1.1 TrialSize.cpt / MediaKeeper 1.1 TrialSize / stack_-1.xml < prev    next >
Extensible Markup Language  |  1992-05-22  |  22KB  |  20 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.1 TrialSize</name>
  5.     <id>-1</id>
  6.     <cardCount>1</cardCount>
  7.     <cardID>2872</cardID>
  8.     <listID>3980</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><true /></cantAbort>
  12.     <cardSize>
  13.         <width>640</width>
  14.         <height>432</height>
  15.     </cardSize>
  16.     <script>on testset cursor to crossrepeat until the mouseclickget the mouselocput getpixel(item 1 of it, item 2 of it) && "‚Ä¢" && itend repeatend teston startupglobal noExecute, thePassword, CardWindowLoc, needsRefresh, myStartUpput true into myStartUpset the userlevel to 2global noExecuteput true into noExecutechkDvlprchkQTif FreeMem() < 1024*1024 thenbeepanswer "You need to give HyperCard more memory!"Quitend ifif the optionKey is "down" then InitGalleryListset cursor to arrowAboutDlogset cursor to watchif isDemoVersion() thensend DoAd to bgend ifput the loc of the card window into CardWindowLocif thePassword ‚↠1309466871 then set the userlevel to 2InitMenusif thePassword ‚↠1309466871 then chkDvlprset the loc of the msg to 200,300hide msgglobal offsetput 0 into offsetadjustThumbif the number of cards > 1 then go next cdput false into noExecuteglobal needsRefreshput true into needsRefreshend startupon chkQTif not hasQT() thenanswer "You need QuickTime to run MediaKeeper"send "doMenu " & quote & "Quit HyperCard" & quote to HyperCardend ifend chkQTon spsend "showPicture the short name of this cd" to bgend spon openstackglobal myStartUpif myStartUp is not "true" thenError "You must Launch MediaKeeper from the Finder, not HyperCard",Quitend ifend openstackon closestackglobal noExecuteif noExecute is not "true" then reset MenuBarend closestackon suspendStacksend "closecard" to bgend suspendStackon resumestackglobal needsRefreshput true into needsRefreshend resumestackon InitMenusset cursor to watchset the userlevel to 2lock screendelete menu "File"delete menu "Edit"delete menu "Go"delete menu "Font"delete menu "Style"create menu "File"create menu "Edit"create menu "Gallery"create menu "Keywords"appleMenufileMenueditMenuGalleryMenuKeyWordMenusend "unlock screen" to HyperCardend InitMenuson arrowKey whichKeyif whichKey = "right" thenTabKey "up"else if whichKey = "left" thenTabKey "down"else if whichKey = "down" thenclick at the loc of bg btn scrollDownelse if whichKey = "up" thenclick at the loc of bg btn scrollUpend ifend arrowKeyon TabKey shftKeyif shftKey is empty then put the shiftKey into shftKeyset cursor to watchput the short name of this cd into cdNameput "S" into char 1 of cdNameif fld GalleryList contains cdName then--elsego card line 1 of fld GalleryListAbortend ifrepeat with n = 1 to the number of lines of fld GalleryListif line n of fld GalleryList is cdName then exit repeatend repeatput n into cdNumif shftKey is not "down" thenadd 1 to cdNumif cdNum > the number of lines of fld GalleryList thenput 1 into cdNumend ifelsesubtract 1 from cdNumif cdNum < 1 thenput the number of lines of fld GalleryList into cdNumend ifend ifget line cdNum of fld GalleryListput "B" into char 1 of itdo "go cd " & quote & it & quoteend TabKeyon PICTHdrset cursor to watchput "Dimensions:" & return &¬¨"Density (dpi):" & return &¬¨"No. Colors:" & return &¬¨"Color Depth:"  & return &¬¨"PICT type:" & return &¬¨"Primary:" & return &¬¨"Background:" into fld HdrInfo2end PICTHdron PICTRsrcHdrset cursor to watchput "Dimensions:" & return &¬¨"Density:" & return &¬¨"No. Colors:" & return &¬¨"Color Depth:"  & return &¬¨"Index:" & return &¬¨"Primary:" & return &¬¨"Background:" into fld HdrInfo2end PICTRsrcHdron PICSHdrset cursor to watchput "Dimensions:" & return &¬¨"Density:" & return &¬¨"No. Colors:" & return &¬¨"Color Depth:"  & return &¬¨"Frames:" & return &¬¨"Primary:" & return &¬¨"Background:" into fld HdrInfo2end PICSHdron SndHdrset cursor to watchput "Snd Name:" & return &¬¨"Size:" & return &¬¨"Type:" & return &¬¨"Length:"  into fld HdrInfo2end SndHdrfunction isDemoVersionreturn truereturn falseend isDemoVersionfunction InsetRect r, valadd val to item 1 of radd val to item 2 of rsubtract val from item 3 of rsubtract val from item 4 of rreturn rend InsetRect--on chkDvlprif the optionKey is "down" and the commandKey is "down" thenask password "Enter access password:"if it = 1309466871 thenglobal thePasswordput it into thePasswordbeepset the userlevel to 5set the blindtyping to trueshow msgexit chkDvlprend ifend ifset the blindtyping to falseend chkDvlpron AppleMenuput "About MediaKeeper..." into menuitem 1 of menu 1end AppleMenuon FileMenuput "New...,Open...,-,Insert...,Insert Folder...,Compact" into menu "File"put "-,Insert PICT Rsrc..."                      after menu "File"put "-,Export...,Import...,-,Catalog Info..."    after menu "File"put "-,Print...,-,Quit"                          after menu "File"set the cmdChar of menuItem "New..."    of menu "File" to Nset the cmdChar of menuItem "Open..."   of menu "File" to Oset the cmdChar of menuItem "Insert..." of menu "File" to Iset the cmdChar of menuItem "Print..."  of menu "File" to Pset the cmdChar of menuItem "Quit"      of menu "File" to QDisable menuItem "Import..."           of menu "File"if isDemoVersion() then--Disable menuitem "Insert Folder..."    of menu "File"Disable menuitem "Insert PICT Rsrc..."   of menu "File"Disable menuitem "New..."                of menu "File"Disable menuitem "Open..."               of menu "File"Disable menuitem "Print..."              of menu "File"end ifend FileMenuon EditMenuput "Undo,Cut,Copy,Paste,Clear,-,Unmark all,-,View Image,Edit Image"¬¨into menu "Edit"put "-,Delete Marked,Delete All" after menu "Edit"set the cmdChar of menuItem "Cut"   of menu "Edit" to Xset the cmdChar of menuItem "Copy"  of menu "Edit" to Cset the cmdChar of menuItem "Paste" of menu "Edit" to Vset the cmdChar of menuItem "Clear" of menu "Edit" to Bdisable menuItem "Undo" of menu "Edit"disable menuItem 9 of menu "Edit"disable menuItem 10 of menu "Edit"end EditMenuon GalleryMenuput "Find...,Find Again,Find Only...,Find Color...,-,Sort...,-"¬¨into menu "Gallery"put "Show marked,Show named,Show all" after menu "Gallery"put "-,Refresh Screen" after menu "Gallery"set the cmdChar of menuItem "Find..."        of menu "Gallery" to Fset the cmdChar of menuItem "Find Again"     of menu "Gallery" to Gset the cmdChar of menuItem "Sort..."        of menu "Gallery" to Sset the cmdChar of menuItem "Show all"       of menu "Gallery" to Aset the cmdChar of menuItem "Refresh Screen" of menu "Gallery" to Yend GalleryMenuon KeyWordMenuif fld KeyWordsMenu is empty thenput "Impressionistic,Surrealistic,Computer Art,Space" into menu "Keywords"put ",-,Modify this menu,-,Auto Comments" after menu "KeyWords"put menu Keywords into fld KeyWordsMenuelseput fld KeyWordsMenu into menu Keywordsend ifend KeyWordMenuon MouseDownInPictureif the shiftKey is "down" thenget the scale of window param(1)if the optionKey is "down" thensubtract 1 from itelseadd 1 to itend ifif it < -5 or it > 5 thenbeepAbortend ifset the scale of window param(1) to itend ifend MouseDownInPicturefunction IconClick numglobal offsetput false into retValput the left of bg btn num + 16 into rput the bottom of bg btn num - 16 into tif item 1 of the clickloc < r and item 2 of the clickloc > t thenput true into retValend ifif not retVal then return retValget the number of lines of fld ScratchListput line (offset+num) of fld GalleryList into snput "B" into char 1 of snput sn into line (it+1) of fld ScratchListdrawscratch sn,the rect of bg btn ((it+1)+23)set the hilite of bg btn "Marked" of cd sn to truereturn retValend IconClickon InitGalleryListglobal offsetput empty into fld GalleryListif fld GalleryList is empty and the number of cds > 1 thenrepeat with n = 2 to the number of cdsset cursor to busyget the short name of cd nput "S" into the first char of itput it into line n-1 of fld GalleryListend repeatend ifput 0 into offsetadjustThumbend InitGalleryListon clipAllQTPict ClipTo,"0,0,1280,1280"end clipAllon clipNoneglobal Clipput true into clipQTPict ClipTo,"0,0,0,0"end clipNoneon LoadGalleryglobal StampRefNum, noExecute, offset,needsRefreshput false into needsRefreshclipallif noExecute is "true" then exit LoadGalleryif the number of this cd is 1 then exit LoadGalleryRedrawend LoadGalleryon Abortglobal needsRefreshexit to HyperCardend Aborton QuitdoMenu "Quit HyperCard"end Quitfunction ErrorMsgif param(1) = 1 then return "Internal error - resources missing."return param(1)end ErrorMsgon Errorbeepif the paramCount > 0 then answer ErrorMsg(param(1)) with "OK"if param(2) is not "Abort" then refreshif the paramCount > 1 then do param(2)end Erroron showStamp RsrcNameglobal offset,LoadFolderif LoadFolder is "true" then exit showStampput offset + the number of lines of fld GalleryList into stampRefNumif StampRefNum > 12 then exit showStampif RsrcName is empty then exit showStampput "S" into first char of RsrcNameQTPict displayPict,RsrcName,the rect of bg btn StampRefNum,resourceend showStampon adjustThumbglobal offsetQTPict ClipTo,the rect of bg btn ScrollRangeadjThumbclipAllupdateTotalsend adjustThumbon NewStackglobal noExecuteif noExecute is "true" then exit NewStackput true into noExecuteput NewFileName() into fNameif fName is empty then Abortclosecardput true into noExecutecreate stack fName with this bggo stack fNamedeleteallput false into noExecuteend NewStackon deleteallglobal noExecuteglobal StampRefNumput 1 into StampRefNumput empty into fld ScratchListclosecardput true into noExecutelock screenrepeat foreverDeleteAllRsrcif the result then exit repeatend repeatput empty into fld gallerylistrepeat with n = 2 to the number of cardsset cursor to busygo last cardsend "DoMenu " & quote & "delete card" & quote to HyperCardend repeatput empty into fld GroupListput false into noExecutesend "doMenu " & quote & "Compact Stack" & quote to HyperCardput 0 into offsetadjustThumbend deleteallon exportput CreateFile() into fNameif fName is empty then exit exportRM ListResNames,"PICT"put the result into bufRM OpenResFile,fNameput the result into resRefNumif ResRefNum < 1 then Error "Error on export [" & resRefNum & "]",Abortrepeat with n = 1 to the number of items of bufset cursor to busyget item n of bufif char 1 of it is "B" thenExportPict it,fName--answer the resultif the result is not "OK" then Error the result,Abortend ifend repeatRM CloseResFile,resRefNumopen file fNamerepeat with n = 2 to the number of cardsset cursor to busywrite "PICT Resource Name: " & the short name of cd n to file fNamewrite return & "~" & return to file fNameset cursor to busywrite fld Info of cd n to file fNamewrite return & "~" & return to file fNameset cursor to busywrite fld Info2 of cd n to file fNamewrite return & "~" & return to file fNameset cursor to busywrite fld KeyWords of cd n to file fNamewrite return & "~" & return to file fNameset cursor to busywrite fld Comments of cd n to file fNamewrite return & "~" & return to file fNameset cursor to busywrite return & "‚Ä¢‚Ä¢‚Ä¢‚Ä¢‚Ä¢" & return & return to file fNameend repeatclose file fNameend exportfunction buildPath cdNumif cdNum is empty then put the short name of this cd into cdNumif line 1 of fld Info of cd cdNum is empty thenError "No catalog exists entry here!",Abortend ifput the short Name of cd cdNum into alisNamedelete last char of alisNamedelete last char of alisNamedelete last char of alisNameget ResolveAlias(alisName)if it contains "Error" thenput line 2 of fld Info of cd cdNum into part1put getFileName(cdNum) into part2put part1 & ":" & part2 into fNameif TestFile(fName) thenreturn fNameelseError "Invalid file reference!",Abortend ifelseput it into part1set itemdelimiter to ":"put last item of part1 into part2delete last item of part1set itemdelimiter to ","if line 1 of fld Info of cd cdNum is not part2 then put part2 into line 1 of fld Info of cd cdNumif line 2 of fld Info of cd cdNum is not part1 then put part1 into line 2 of fld Info of cd cdNumreturn itend ifend buildPathfunction getFileName cdNumif cdNum is empty then put the short name of this cd into cdNumput line 1 of fld Info of cd cdNum into fNamereturn fNameend getFileNamefunction TestFile fNameput fName & ".sit" into archNameput GetFileSize(archName) into valif val > 0 thenunstuff archNameend ifput GetFileSize(fName) into valif val < 0 thenput FileError(val,fName) into errMsgif errMsg contains "Please mount the disk " thenrepeat while val < 0beepanswer errMsg with "Cancel"  or "Try Again"if it is "Cancel" then Abortif it is "Update" thenanswer "Update function not yet implemented!"end ifsend "idle" to HyperCardput GetFileSize(fName) into valend repeatglobal needsRefreshput true into needsRefreshreturn trueelseglobal needsRefreshput true into needsRefreshError errMsg, Abortend ifelsereturn trueend ifend TestFilefunction FileError errNo, fNameif errNo = -43 or errNo = -35 or errNo = -53 thenreturn "Mount " & StripVolFromPath(fName)elsereturn "Error [" & errNo & "] on " & StripPath(fName) &¬¨" on volume " & StripVolFromPath(fName)end ifend FileErrorfunction StripFileFromPath pathNamerepeat with n = the length of pathName down to 1if last char of pathName is ":" then exit repeatdelete last char of pathNameend repeatdelete last char of pathNamereturn pathNameend StripFileFromPathfunction StripPath pathNameset itemdel to ":"get last item of pathNameset itemdel to ","return itend StripPathfunction StripVolFromPath pathNameset itemdelimiter to ":"put item 1 of pathName into volNameset itemdelimiter to ","return volNameend StripVolFromPathon ViewPict cdNumif cdNum is empty then put the short name of this cd into cdNumif FileType(cdNum) is not "PICT" then Error "Selection is not a PICT file.",Abortput buildPath(cdNum) into fNameclipNonesend "lock screen" to HyperCardpicture fName, file, zoom, true, 32Abortend ViewPicton ViewPICS cdNumif cdNum is empty then put the short name of this cd into cdNumRunMovie buildPath(cdNum), "0,0", beep,2,0,the timeend ViewPICSon ViewEPSF cdNumclipNonedoCopypicture GetFileName(cdNum),clipboard,zoom,true,32FlushEventsclipAllend ViewEPSFon ViewMooV cdNumif cdNum is empty then put the short name of this cd into cdNumif FileType(cdNum) is not "MooV" then Error "Current item is not a QuickTime movie",Abortput buildPath(cdNum) into fNameopen fName with "Simple Player"end viewMooVon EditPict cdNumif cdNum is empty then put the short name of this cd into cdNumif FileType(cdNum) is not "PICT" then Error "Selection is not a PICT file.",Abortput buildPath(cdNum) into fNameput the length of fName into lenif char len-3 to len of fName is ".pwg" thenput "d" into char len-2 of fNameopen fName with "CAD Editor"elseopen fName with "PICT Editor"end ifend EditPicton EditEPSF cdNumif cdNum is empty then put the short name of this cd into cdNumif FileType(cdNum) is not "EPSF" then Error "Selection is not a EPSF file.",Abortput buildPath(cdNum) into fNameopen fName with "EPSF Editor"end EditEPSFon EditPICS cdNumif cdNum is empty then put the short name of this cd into cdNumopen buildPath(cdNum) with "PICS Editor"end EditPICSon EditMooV cdNumif cdNum is empty then put the short name of this cd into cdNumif FileType(cdNum) is not "MooV" then Error "Current item is not a QuickTime movie",Abortput buildPath(cdNum) into fNameopen fName with "Movie Editor"end EditMooVon closePictureglobal needsRefreshput true into needsRefreshhide window param(1)ClipAllend closePictureon selectFldLine lineNum, theFldput offset(return & line lineNum of fld theFld,fld theFld) + 1 into sput s + (the length of line lineNum of fld theFld)  into eselect char s to e of fld theFldend selectFldLinefunction FileType cdNumif the number of this cd is 1 then return ""if cdNum is empty then put the short name of this cd into cdNumif fld HdrInfo2 of cd cdNum contains "Snd Name" then return "snd"if line 5 of fld Info2 of cd cdNum is "PostScript" then return "EPSF"if line 5 of fld HdrInfo2 of cd cdNum is "index:" then return "PictRsrc"return line 3 of fld Info of cd cdNumend FileTypefunction hasMemory pathspecif GetFileSize(pathspec) > FreeMem() thenreturn falseelsereturn trueend ifend hasMemoryon refreshif the tool is not "browse tool" then exit refreshglobal offsetclipAllif the width of fld Comments > 30 or¬¨the width of fld Keywords > 30 thenexit refreshend ifset the hilite of bg btn refreshlite to truesploadgalleryset the hilite of bg btn refreshlite to falseupdateTotalsend refreshon moveGalleryglobal offsetset cursor to watchget the short name of this cdput "S" into char 1 of itput false into foundOneput the number of lines of fld GalleryList into totalrepeat with n = 1 to totalif line n of fld GalleryList is it thenput true into foundOneexit repeatend ifend repeatif not foundOne then Error "Current item not displayed in the" &¬¨" catalog gallery.  Try Show All.",Abortput trunc(n/4) * 4 into offsetsubtract 4 from offsetif offset < 0 then put 0 into offsetglobal noExecuteput false into noExecuteadjustThumbglobal needsRefreshput true into needsRefreshend moveGalleryon checkMemoryif FreeMem() < 720*1024 thenput the seconds + (60*1) into memWarningError "                         >>>Warning<<<    " & return & return & "                       Low on memory.",Abortend ifend checkMemoryon adjThumbglobal offsetif offset is empty then put 0 into offsetput (the number of lines of fld GalleryList) into totalsubtract 12 from totalif total < 1 then put 1 into totalput (offset/total) into prcntget the rect of bg btn ScrollRangeput item 2 of it into tput item 4 of it into bput b-t into hget the loc of bg btn 47put t + round(h*prcnt) into item 2 of itput the height of bg btn 47 into Thput round(Th/2) into Thadd Th to item 2 of itif item 2 of it > (b-Th) thenput b - Th into item 2 of itend ifset the loc of bg btn 47 to itput offset + 1 into tset the name of bg btn 47 to tend adjThumbon updateTotalsclipAllget the number of cardsput it - 1 into totget the number of lines of bg fld "GalleryList"put it into gtotput 0 into gcardrepeat with n = 1 to gtotget line n of fld GalleryListput "B" into char 1 of itput it into t1get the short name of this cdput it into t2if t1 is t2 thenput n into gcardexit repeatend ifend repeatget the number of this cdput it - 1 into cdNumput gcard & "/" & gtot & " - " & cdNum & "/" & tot into fld TotalCardsend updateTotalson FindColorsglobal SrchStrask "Search for..." with SrchStrif it is empty then Abortput fld galleryList into fld UndoListput it into SrchStrglobal needsRefreshput true into needsRefreshrepeat with n = 1 to the number of lines of fld GalleryListset cursor to busyput line n of fld GalleryList into cdNameput "B" into char 1 of cdNameget fld otherColors of cd cdNameif it contains SrchStr thenget cdNameput "S" into char 1 of itput it & return after bufnext repeatend ifend repeatif buf is empty then Error "No matches found!",Abortglobal offsetput buf into fld GalleryListput 0 into offsetclipAllglobal needsRefreshput true into needsRefreshadjustthumbclipAllexit to hypercardend FindColorson lockclipNonesend "lock screen" to HyperCardend lockon unlockglobal needsRefreshclipAllput true into needsRefreshsend "unlock screen" to HyperCardend unlockon modKeyWordsMenuglobal needRefreshput true into needRefreshput false into allDoneput menu "KeyWords" into bufdelete last line of bufdelete last line of bufdelete last line of bufdelete last line of bufrepeat while not allDoneget showList(buf,"Keywords Menu",false,false,"OK,Cancel^,Remove,Add",1)put it into modChoiceif line 1 of modChoice is "Cancel" then Abortif line 1 of modChoice is "OK" then put true into allDoneif line 1 of modChoice is "Add" thenask "Enter new keyword..."if it is not empty thenput the number of lines of buf into nput it into line (n+1) of bufend ifend ifif line 1 of modChoice is "Remove" thenput line 2 of modChoice into ldelete line l of bufend ifsort the lines of bufend repeatput return & "-" & return & "Modify this menu" after bufput return & "-" & return & "Auto Comments" after bufrepeat with j = the number of lines of buf down to 1if line j of buf is empty then delete line j of bufend repeatput buf into menu "Keywords"put buf into fld KeyWordsMenuend modKeyWordsMenuon compactStackcompactColorssend "doMenu " & quote & "Compact Stack" & quote to HyperCardend compactStackon compactColorsglobal noExecuteput true into noExecutepush this cardlock screenrepeat with n = 2 to the number of cardsgo cd nput fld otherColors into buf1put empty into buf2repeat with m = 1 to the number of lines of buf1set cursor to busyif buf2 contains line m of buf1 thennext repeatelseput return & line m of buf1 after buf2end ifend repeatif first char of buf2 is return then delete first char of buf2put buf2 into fld otherColorsend repeatpop cardsend "unlock screen" to HyperCardput false into noExecuteend compactColors</script>
  17.     <background id="2630" file="background_2630.xml" name="" />
  18.     <card id="2872" file="card_2872.xml" marked="false" name="" owner="2630" />
  19. </stack>
  20.